﻿@model IEnumerable<Health.Models.SearchViewModel>

@{
    ViewBag.Title = "Search";
}

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="~/Content/Site.css">
<link rel="stylesheet" href="~/Content/newbootstrap.min.css">
<script src="~/Content/jquery.min.js"></script>
<script src="~/Content/newbootstrap.min.js"></script>
<head>

    <title>
        Search
    </title>
</head>
<body>
    <style>
        .recordImage {
            width: 25%;
    float: left;
    max-width: 215px;
    min-width: 90px;
    margin-right: 5px;
    max-height: 90px;
    border: 4px solid #FFF;
    -webkit-box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.5);
    -moz-box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.5);
    box-shadow: 0px 0px 8px 2px rgba(0,0,0,0.5);
    margin-top: 7px;

        }
                .genderIcon
        {
            float: right;
            height: 40px;
            width: 30px;
            margin-right: 1px;
            padding-top: 10px;
        }
                h4
                {
                    font-weight: bold;
                    color: #FF0033;
                }
    </style>

    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
     
            </div>
        </div>
    </div>
    <br />
    <div class="container-fluid titleSearch check-in" >
        <h4>Verify Patient</h4>

        @Html.ActionLink("Cancel", "Index", "Home", null, new { @class = "btn btn-default pull-right cancel" })
    </div>

    @foreach (var item in Model)
    {
        <div class="container-fluid records check-in" >
            <a href='@Url.Action("Index", "Patient", new { ID = item.Identifier })' class="searchRecords">
                <div class="imageRecord">
                    @if (item.Photo != null)
                    {
                        <img src="@String.Format("data:image/png;base64,{0}", item.Photo)" class="recordImage img-circle">
                    }
                    else
                    {
                        <img src="~/Content/Image/Maureen_1.jpeg" class="recordImage img-circle">
                    }
                    
                </div>
                <div class="recordName">
                    @Html.DisplayFor(modelItem => item.LastName), @Html.DisplayFor(modelItem => item.FirstName)

                </div>
                <div class="recordInfo">
                    @Html.DisplayFor(modelItem => item.Identifier)<br />
                   
                    @Html.DisplayFor(modelItem => item.BirthDate)<br/>
                    @if (item.Gender == "M")
                    {
                        <span>
                            <img class="genderIcon" src="~/Content/Image/genderMale.png" />
                        </span>
                    }
                    else if (item.Gender == "F")
                    {
                        <span>
                            <img class="genderIcon" src="~/Content/Image/genderFemale.png" />
                        </span>
                    }
                    else
                    {
                        <span>
                            <img class="genderIcon" src="~/Content/Image/genderUnknown.png" />
                        </span>
                    }
                    @Html.DisplayFor(modelItem => item.Line) <br />
                    @Html.DisplayFor(modelItem => item.City), @Html.DisplayFor(modelItem => item.State)
                </div>
            </a>
        </div>

    }
</body>
        